<div style="font-size:16px;font-weight:bold;padding:10px;margin:10px 0"><a href="news_cats.html">QUẢN TRỊ DANH MỤC TIN TỨC</a> [ <a href="{$url_add}">Thêm danh mục</a> ]</div>
  
{if $cats}
    <table width="100%" border="0" cellpadding="5" cellspacing="1" style="border:1px solid #CCCCCC;margin-top:10px" bgcolor="#CCCCCC">
      <tr valign="top"  >
        <td width="6%" align="center" bgcolor="#FFFFFF"><strong>ID</strong></td>
        <td width="13%" bgcolor="#FFFFFF"><strong>Tên</strong></td>
        <td width="9%" bgcolor="#FFFFFF"><strong>Keywords</strong></td>
        <td width="9%" bgcolor="#FFFFFF"><strong>Description</strong></td>
        <td width="9%" bgcolor="#FFFFFF"><strong>Vị trí</strong></td>
        <td width="11%" align="center" bgcolor="#FFFFFF"><strong>Move Home</strong></td>
        <td width="11%" align="center" bgcolor="#FFFFFF"><strong>Move End</strong></td>
        <td width="10%" align="center" bgcolor="#FFFFFF"><strong>Lên</strong></td>
        <td width="12%" align="center" bgcolor="#FFFFFF"><strong>Xuống</strong></td>
        <td width="15%" align="center" bgcolor="#FFFFFF"><strong>Trạng thái</strong></td>
        <td width="13%" align="center" bgcolor="#FFFFFF"><strong>Thao tác</strong></td>
      </tr>
      
      {foreach from=$cats item=item}
      <tr valign="top"  >
        <td align="center" bgcolor="#FFFFFF">{$item.id}</td>
        <td bgcolor="#FFFFFF"><a href="{$item.url}">{$item.name}</a></td>
        <td bgcolor="#FFFFFF">{$item.keywords}</td>
        <td bgcolor="#FFFFFF">{$item.description}</td>
        <td bgcolor="#FFFFFF">{$item.position}</td>
        <td align="center" bgcolor="#FFFFFF">{$item.move_home}</td>
        <td align="center" bgcolor="#FFFFFF">{$item.move_end}</td>
        <td align="center" bgcolor="#FFFFFF">{$item.move_up}</td>
        <td align="center" bgcolor="#FFFFFF">{$item.move_down}</td>
        <td align="center" bgcolor="#FFFFFF">{if $item.public}<font color="#0000FF">Hiển thị</font>{else}<font color="red">Ẩn</font>{/if}</td>
        <td align="center" nowrap="nowrap" bgcolor="#FFFFFF">[ <a href="{$item.edit}">Sửa</a> ] [ <a href="{$item.delete}" onclick="return confirm('Bạn có chắc chắn muốn xóa danh mục tin này không?');">Xóa</a> ]</td>
      </tr>
      {/foreach}
    </table>
{else}
<center>Chưa có mục nào!</center>
{/if}